﻿using ReflectionStudio.Components.UserControls;
using ReflectionStudio.Core.Events;
using System;
using System.ComponentModel;
using System.Data;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
namespace WPFExcelReport
{
    public partial class MainWindow : DocumentBase
    { 
        ViewModelBase vm;
        public MainWindow()
        {
            vm = new ViewModelBase();
            DataContext = vm;
            InitializeComponent();  
            this.Name = "发票管理";

        }
        ViewBase ui;
        public override void OnWorkflowIDChange(MessageEventArgs e)
        {
            base.OnWorkflowIDChange(e);
            string wfid = e.Info.Details;
            MainTab.Children.Clear();
            switch (wfid)
            {
                case "TVRPOS":
                    ui = new TVRPOS();
                    MainTab.Children.Add(ui);
                    ((TVRPOS)ui).VKP = e.Info.ORDER;
                    break;
                case "CMVR":
                    ui = new TCMVR05();
                    MainTab.Children.Add(ui);
                    this.Name = "代理佣金";
                    break;
                case "BNVR":
                    ui = new TBNVR05();
                    MainTab.Children.Add(ui);
                    this.Name = "提成计算";
                    break; 
            }
        }
        public override void Window_Loaded(object sender, RoutedEventArgs e)
        { 
            

        } 
        
    }
}
